package ${packageName}.${moduleName}.service;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.open.common.persistence.Page;
import com.open.common.service.CrudService;
import ${packageName}.${moduleName}.model.po.${className};
import ${packageName}.${moduleName}.model.dao.${className}Dao;

@Service
@Transactional(readOnly = true)
public class ${className}Service extends CrudService<${className}Dao, ${className}> {

    private static Logger log = LoggerFactory.getLogger(${className}Service.class);

    @Autowired
    private ${className}Dao ${className?uncap_first}Dao;

	public ${className?cap_first} get(String id) {
		return super.get(id);
	}

	public List<${className}> findList(${className} ${className?uncap_first}) {
        log.info("参数${className?uncap_first}: {}", ${className?uncap_first});
        return super.findList(${className?uncap_first});
	}

	public Page<${className}> findPage(Page<${className}> page, ${className} ${className?uncap_first}) {
        log.info("参数${className?uncap_first}: {}", ${className?uncap_first});
		return super.findPage(page, ${className?uncap_first});
	}

	@Transactional(readOnly = false)
	public void save(${className} ${className?uncap_first}) {
        log.info("参数${className?uncap_first}: {}", ${className?uncap_first});
		super.save(${className?uncap_first});
	}

	@Transactional(readOnly = false)
	public int delete(${className} ${className?uncap_first}) {
        log.info("参数${className?uncap_first}: {}", ${className?uncap_first});
		return super.delete(${className?uncap_first});
	}
}